package com.aaron.study.customer.controller;

import java.security.Principal;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 获取当前的授权用户
 * <p>
 * <a href="https://gitee.com/aaronsd/spring-cloud-security/">spring-cloud-security</a>
 *
 * @author <a href="mailto:610195979@qq.com?subject=com.aaron.study.spring-cloud-security">aaron</a>
 * @version 0.0.1
 */
@RestController
public class AppInfoController {

	@GetMapping(path = "/current")
	public Principal getCurrentAccount(Principal principal) {
		return principal;
	}
}
